﻿@model AdminUserDTO
@{
    ViewBag.Title = "Index";
    Layout = null;
}

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>LuShanTea后台管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <!-- load css -->
    <link rel="stylesheet" type="text/css" href="~/common/layui/css/layui.css" media="all">
    <link rel="stylesheet" type="text/css" href="~/common/global.css" media="all">
    <link rel="stylesheet" type="text/css" href="~/css/adminstyle.css" media="all">


</head>
<body>
    <div class="layui-layout layui-layout-admin" id="layui_layout">
        <!-- 顶部区域 -->
        <div class="layui-header header header-demo">
            <div class="layui-main">
                <!-- logo区域 -->
                <div class="admin-logo-box">
                    <a class="logo" href="/" title="logo">后台管理系统</a>
                    <div class="larry-side-menu">
                        <i class="fa fa-bars" aria-hidden="true"></i>
                    </div>
                </div>

                <!-- 右侧导航 -->
                <ul class="layui-nav larry-header-item">
                    <li class="layui-nav-item" lay-unselect="">

                        <a href="javascript:;">
                            <img src="@(Model.ImgSrc==null?null:" http://static.amortal.top/"+Model.ImgSrc)">
                            <cite>@Model.NickName</cite>
                            <span class="layui-nav-more"></span>
                        </a>
                        <dl class="layui-nav-child layui-anim layui-anim-upbit">
                            <dd><a lay-href="/Main/AdminInfo">基本资料</a></dd>
                            <dd><a lay-href="/Main/ChangePwd">修改密码</a></dd>
                            <hr />
                            <dd id="logout" layadmin-event="logout" style="text-align: center;"><a class="logouthref" lay-href="~/Main/Logout">退出</a></dd>
                        </dl>
                    </li>

                </ul>
            </div>
        </div>
        <!-- 左侧侧边导航开始 -->
        <div class="layui-side layui-side-bg layui-larry-side" id="larry-side">
            <div class="layui-side-scroll" id="larry-nav-side" lay-filter="side">

                <!-- 左侧菜单 -->
                <ul class="layui-nav layui-nav-tree">
                    <li class="layui-nav-item layui-this">
                        <a href="javascript:;" data-url="/main.html">
                            <i class="iconfont icon-home1" data-icon='icon-home1'></i>
                            <span>后台首页</span>
                        </a>
                    </li>
                    <!-- 个人信息 -->
                    <li class="layui-nav-item">
                        <a href="javascript:;">
                            <i class="iconfont icon-jiaoseguanli"></i>
                            <span>我的面板</span>
                            <em class="layui-nav-more"></em>
                        </a>
                        <dl class="layui-nav-child">
                            <dd>
                                <a href="javascript:;" data-url="/Main/AdminInfo">
                                    <i class="iconfont icon-geren1" data-icon='icon-geren1'></i>
                                    <span>个人信息</span>
                                </a>
                            </dd>
                            <dd>
                                <a href="javascript:;" data-url="/Main/ChangePwd">
                                    <i class="iconfont icon-iconfuzhi01" data-icon='icon-iconfuzhi01'></i>
                                    <span>修改密码</span>
                                </a>
                            </dd>
                        </dl>
                    </li>
                    <!-- 管理员管理 -->
                    <li class="layui-nav-item">
                        <a href="javascript:;">
                            <i class="iconfont icon-jiaoseguanli2"></i>
                            <span>管理员管理</span>
                            <em class="layui-nav-more"></em>
                        </a>
                        <dl class="layui-nav-child">

                            <dd>
                                <a href="javascript:;" data-url="/Permission/List">
                                    <i class="iconfont icon-quanxianxiugai" data-icon='icon-yonghu1'></i>
                                    <span>权限项管理</span>
                                </a>
                            </dd>
                            <dd>
                                <a href="javascript:;" data-url="/Role/List">
                                    <i class="iconfont icon-jiaoseguanli4" data-icon='icon-jiaoseguanli4'></i>
                                    <span>角色管理</span>
                                </a>
                            </dd>
                            <dd>
                                <a href="javascript:;" data-url="/AdminUser/List">
                                    <i class="iconfont icon-jiaoseguanli2" data-icon='icon-quanxian2'></i>
                                    <span>人员管理</span>
                                </a>
                            </dd>
                        </dl>
                    </li>

                    <!-- 商品管理 -->
                    <li class="layui-nav-item">
                        <a href="javascript:;">
                            <i class="iconfont icon-word"></i>
                            <span>商品管理</span>
                            <em class="layui-nav-more"></em>
                        </a>
                        <dl class="layui-nav-child">

                            <dd>
                                <a href="javascript:;" data-url="/Good/List">
                                    <i class="iconfont icon-quanxianxiugai" data-icon='icon-yonghu1'></i>
                                    <span>商品管理</span>
                                </a>
                            </dd>
                            <dd>
                                <a href="javascript:;" data-url="/Category/List">
                                    <i class="iconfont icon-shengchengbaogao" data-icon='icon-yonghu1'></i>
                                    <span>商品类别管理</span>
                                </a>
                            </dd>
                            <dd>
                                <a href="javascript:;" data-url="/Pack/List">
                                    <i class="iconfont icon-zhuti" data-icon='icon-yonghu1'></i>
                                    <span>包装类型</span>
                                </a>
                            </dd>
                            <dd>
                                <a href="javascript:;" data-url="/GoodAttr/List">
                                    <i class="iconfont icon-wenzhang2" data-icon='icon-yonghu1'></i>
                                    <span>商品属性</span>
                                </a>
                            </dd>
                            <dd>
                                <a href="javascript:;" data-url="/Comment/List">
                                    <i class="iconfont icon-pinglun1" data-icon='icon-yonghu1'></i>
                                    <span>商品评论</span>
                                </a>
                            </dd>
                        </dl>
                    </li>
                    <!--前台用户管理-->
                    <li class="layui-nav-item">
                        <a href="javascript:;">
                            <i class="iconfont icon-jiaoseguanli2"></i>
                            <span>前台数据管理</span>
                            <em class="layui-nav-more"></em>
                        </a>
                        <dl class="layui-nav-child">


                            <dd>
                                <a href="javascript:;" data-url="/User/List">
                                    <i class="iconfont icon-jiaoseguanli2" data-icon='icon-quanxian2'></i>
                                    <span>前端人员管理</span>
                                </a>
                            </dd>
                            <dd>
                                <a href="javascript:;" data-url="/Cart/List">
                                    <i class="iconfont icon-shengchengbaogao1" data-icon='icon-quanxian2'></i>
                                    <span>购物车管理</span>
                                </a>
                            </dd>
                            <dd>
                                <a href="javascript:;" data-url="/Collect/List">
                                    <i class="iconfont icon-pinglun" data-icon='icon-quanxian2'></i>
                                    <span>收藏商品管理</span>
                                </a>
                            </dd>
                            <dd>
                                <a href="javascript:;" data-url="/Order/List">
                                    <i class="iconfont icon-daishenhe" data-icon='icon-quanxian2'></i>
                                    <span>订单管理</span>
                                </a>
                            </dd>
                            <dd>
                                <a href="javascript:;" data-url="/Address/List">
                                    <i class="iconfont icon-shuaxin" data-icon='icon-quanxian2'></i>
                                    <span>收货地址管理</span>
                                </a>
                            </dd>
                        </dl>
                    </li>
                    <!--省市表管理-->
                    <li class="layui-nav-item">
                        <a href="javascript:;">
                            <i class="iconfont icon-wenzhang1"></i>
                            <span>省市区管理</span>
                            <em class="layui-nav-more"></em>
                        </a>
                        <dl class="layui-nav-child">
                            <dd>
                                <a href="javascript:;" data-url="/Province/List">
                                    <i class="iconfont icon-lanmuguanli" data-icon='icon-lanmuguanli'></i>
                                    <span>省表管理</span>
                                </a>
                            </dd>
                            <dd>
                                <a href="javascript:;" data-url="/City/List">
                                    <i class="iconfont icon-wenzhang2" data-icon='icon-wenzhang2'></i>
                                    <span>市表管理</span>
                                </a>
                            </dd>
                            <dd>
                                <a href="javascript:;" data-url="/Area/List">
                                    <i class="iconfont icon-icon1" data-icon='icon-icon1'></i>
                                    <span>区表管理</span>
                                </a>
                            </dd>

                        </dl>
                    </li>

                    <!-- 系统设置 -->
                    <li class="layui-nav-item">
                        <a href="javascript:;">
                            <i class="iconfont icon-xitong"></i>
                            <span>系统管理</span>
                            <em class="layui-nav-more"></em>
                        </a>
                        <dl class="layui-nav-child">
                            <dd>
                                <a href="javascript:;" data-url="/Log/List">
                                    <i class="iconfont icon-rizhi" data-icon='icon-zhandianguanli1'></i>
                                    <span>日志管理</span>
                                </a>
                            </dd>
                            <dd>
                                <a href="javascript:;" data-url="/IdName/List">
                                    <i class="iconfont icon-zhandianpeizhi" data-icon='icon-zhandianpeizhi'></i>
                                    <span>数据字典表管理</span>
                                </a>
                            </dd>
                            <dd>
                                <a href="javascript:;" data-url="/Setting/List">
                                    <i class="iconfont icon-zhandianguanli1" data-icon='icon-zhandianguanli1'></i>
                                    <span>配置键值管理</span>
                                </a>
                            </dd>

                        </dl>
                    </li>

                </ul>
            </div>
        </div>

        <!-- 左侧侧边导航结束 -->
        <!-- 右侧主体内容 -->
        <div class="layui-body" id="larry-body" style="bottom: 0;border-left: solid 2px #2299ee;">
            <div class="layui-tab layui-tab-card larry-tab-box" id="larry-tab" lay-filter="demo" lay-allowclose="true">
                <div class="go-left key-press pressKey" id="titleLeft" title="滚动至最右侧">
                    <i class="larry-icon larry-weibiaoti6-copy"></i>
                </div>
                <ul class="layui-tab-title">
                    <li class="layui-this" id="admin-home"><i class="iconfont icon-diannao1"></i><em>后台首页</em></li>
                </ul>
                <div class="go-right key-press pressKey" id="titleRight" title="滚动至最左侧">
                    <i class="larry-icon larry-right"></i>
                </div>
                <ul class="layui-nav closeBox">
                    <li class="layui-nav-item">
                        <a href="javascript:;"><i class="iconfont icon-caozuo"></i> 页面操作</a>
                        <dl class="layui-nav-child">
                            <dd>
                                <a href="javascript:;" id="refresh_iframe" class="refresh refreshThis">
                                    <i class="layui-icon">&#x1002;</i>
                                    刷新当前
                                </a>
                            </dd>
                            <dd>
                                <a href="javascript:;" id="closePageOther" class="closePageOther">
                                    <i class="iconfont icon-prohibit"></i>
                                    关闭其他
                                </a>
                            </dd>
                            <dd>
                                <a href="javascript:;" id="closePageAll" class="closePageAll"><i class="iconfont icon-guanbi"></i> 关闭全部</a>
                            </dd>
                        </dl>
                    </li>
                </ul>
                <div class="layui-tab-content" style="min-height: 150px; ">
                    <div class="layui-tab-item layui-show">
                        <iframe class="larry-iframe" data-id='0' src="/main.html"></iframe>
                    </div>
                </div>
            </div>
        </div>
        <!-- 底部区域 -->
        <div class="layui-footer layui-larry-foot" id="larry-footer">
            <div class="layui-mian">
                <p class="p-admin">
                    <span>2017 &copy;</span>
                    Dev Team团队 版权所有
                </p>
            </div>
        </div>
    </div>

    <!-- 加载js文件-->
    <script type="text/javascript" src="~/common/layui/layui.js"></script>
    <script type="text/javascript" src="~/js/larry.js"></script>
    <script type="text/javascript" src="~/js/index.js"></script>

    <script>
        layui.config({
            base: "/js/"
        }).use(['layer', 'jquery'], function () {
            var layer = parent.layer === undefined ? layui.layer : parent.layer,
                laypage = layui.laypage,
                $ = layui.jquery;

            $("#logout").click(function () {

                var url = $(".logouthref").attr("lay-href");

                $.ajax({
                    url: url,
                    method: "post",
                    dataType: "json",
                    success: function (res) {

                        if (res.status == "ok") {
                            layer.msg("退出系统成功，即将返回登录界面。", {
                                icon: 1, time: 2000, end: function () {
                                    location.href = "/AdminLogin/Index";
                                }
                            });
                        } else {
                            layer.msg("退出登录失败", { icon: 5 });
                        }

                    },
                    error: function () {
                        layer.msg("网络请求失败", {
                            icon: 5, time: 2000
                        });
                    }
                });
            });
            

            
        })
    </script>
</body>
</html>